﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net.Mail;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace MT.Common.Helpers
{
    public class CellphooneHelper
    {
        public const int MaxCellphoneNumberLength = 11;


        public static bool IsValidCellphone(string cellphone)
        {
            if (string.IsNullOrWhiteSpace(cellphone))
            {
                return false;
            }

            if (cellphone.Length > MaxCellphoneNumberLength)
            {
                return false;
            }

            return System.Text.RegularExpressions.Regex.IsMatch(cellphone, @"^[1]+\d{10}");

        }

    }
}